* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin: 20px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.btn {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 10px 5px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.input-field {
  width: 100%;
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 16px;
  margin: 10px 0;
  transition: border-color 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #667eea;
}

.correct {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.incorrect {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.hint {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 15px;
  border-radius: 10px;
  margin: 10px 0;
}

.japanese-text {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin: 15px 0;
  text-align: center;
}

.chinese-text {
  font-size: 20px;
  color: #666;
  margin: 10px 0;
  text-align: center;
}

.score {
  font-size: 18px;
  color: #667eea;
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background-color: #e1e5e9;
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(45deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

/* 返回首页按钮样式 */
.back-home-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  border: 2px solid #667eea;
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.back-home-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .card {
    padding: 20px;
    margin: 10px 0;
  }
  
  .japanese-text {
    font-size: 20px;
  }
  
  .chinese-text {
    font-size: 18px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .back-home-btn {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 5px;
  }
  
  .card {
    padding: 15px;
  }
  
  .japanese-text {
    font-size: 18px;
  }
  
  .chinese-text {
    font-size: 16px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .back-home-btn {
    top: 5px;
    right: 5px;
    padding: 5px 10px;
    font-size: 11px;
  }
}
